home *** CD-ROM | disk | FTP | other *** search
- Path: news.tricon.net!usenet
- From: Thomas A Cooper <tacooper@tricon.net>
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Q:Hex to Decimal?
- Date: Thu, 11 Apr 1996 11:17:29 -0400
- Organization: Tri-Cities Connection
- Message-ID: <316D2289.4759@tricon.net>
- NNTP-Posting-Host: pm1-13.tricon.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0GoldB1 (Win95; I)
-
- I saw in a magazine a simple function to convert a HEX string to an
- integer:
-
- long int FAR PASCAL hex2int(char far *s)
- {
- return strtol(s,NULL,16);
- }
-
- I'm struggling with the reverse situation, a function to convert an
- integer into a HEX string. Anybody got any ideas?? Thanks in advance for
- your help.
- Tom Cooper
- tacooper@tricon.net
-